<%@ page language="java" import="logic.*,java.util.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SOS PLANET - Ayuda al mundo</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<div id="wrapper">
<div class="content">
<div id="header">
	<%@ include file = "includes/header.jsp" %>
</div><!-- header -->

<div id="menu">      
	<%@ include file = "includes/menu.html" %>
</div><!-- menu -->
    <form action="showPurchase.jsp" method="get">       
	<p id="parrafoQ1" >Elige un destino para que reciba los beneficios de la compra</p>

		<%
			List<Destination> ld = DestinationList.getInstance().getDestinations();
		if(ld == null){
			%>Fallo en la conexion con los destinos<%
		}else{
			%><p id="parrafoQ2">
			<select name="destSelect">
				<option value="noDest">Aleatorio</option><%
			for(int i = 0; i < ld.size(); i++){
				%>
				<option value="<%=ld.get(i).getId() %>"> <%=ld.get(i).getName()%> </option> <%
			}
		}
		%>
			</select></p>
			
		<div id="parrafoQ2"><input id="parrafoQ2" type="submit" name="Submit" value="Confirmar"></div>
    </form>
<div id="footer">
	<%@ include file = "includes/footer.html" %>
</div><!--footer-->

</div><!--content-->
</div><!--wrapper-->
</body>
</html>